package com.bdqn.reflect.pojo;

import java.io.IOException;
import java.io.Serializable;

/**
 * 人类
 *
 * @author LILIBO
 * @since 2024/6/27
 */
public class Person extends BaseClass implements Serializable {

    // 成员变量
    private String name;
    static final int age = 30;
    protected String address;
    public String message;

    public Person() {

    }

    public Person(String name) {
        this.name = name;
    }

    private Person(String name, String message) {
        this.name = name;
        this.message = message;
    }

    protected Person(String name, String address, String message) {
        this.name = name;
        this.address = address;
        this.message = message;
    }

    @Override
    public String toString() {
        return "{name:" + name + ",address:" + address + ",message:" + message + "}";
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    static int getAge() {
        return age;
    }

    public String getAddress() {
        return address;
    }

    private void silentMethod() throws IOException, NullPointerException {
        System.out.println("这是悄悄话");
    }

    private String silentMethod(String msg) throws IOException, NullPointerException {
        String say = "这是悄悄话：" + msg;
        System.out.println(say);
        return say;
    }

}
